package com.hbzd.protection.mapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.hbzd.protection.entity.Employee;

@Repository
public interface EmployeeMapper {
	/**
	 * 根据openid查询用户
	 * @param openid
	 * @return
	 */
	Employee getByOpenId(String openid);
	/**
	 * 根据用户电话查找
	 * @param phone
	 * @return
	 */
	Employee getByPhone(String phone);
	/**
	 * 更新用户信息
	 * @param employee
	 */
	void update(Employee employee);
	/**
	 * 添加用户
	 * @param employee
	 */
	void add(Employee employee);
	/**
	 * 修改员工密码
	 * @param employee
	 */
	void modifyPassword(Employee employee);
	/**
	 * 删除用户openid
	 * @param employee
	 */
	void updateOpenid(Employee employee);
	/**
	 * 更新用户状态
	 * @param startTask
	 * @param fromUserName
	 */
	void updateState(@Param("state")int startTask,@Param("openid") String openid);
}
